package com.itheima.neibulei;

import java.util.Random;

public interface Demo7 {
    int get();
}

class Tt{
    public static void main(String[] args) {
        Demo7 d=new Demo7(){
            @Override
            public int get() {
                Random ran=new Random();
                int r=ran.nextInt(10);
                return r;
            }
        };
        Demo7 d7=()->{   Random ran=new Random();
            int r=ran.nextInt(10);
            return r;};
        System.out.println(d.get());
        System.out.println(d7.get());
    }
}